home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-08-30 | 1.4 KB | 42 lines | [TEXT/CWIE] |
- // ===========================================================================
- // UException.cp ©1995 Metrowerks Inc. All rights reserved.
- // ===========================================================================
- //
- // The C++ draft standard states that the Exception Handling mechanism
- // call terminate() when encountering certain unrecoverable errors,
- // such as:
- // - Not finding a handler for a thrown exception
- // - Finding a corrupted stack
- // - A destructor called during stack unwinding tries to exit
- // using an exception
- //
- // The default implementation of terminate() calls abort().
- //
- // abort() is a standard ANSI C library function. Since PowerPlant
- // programs frequently don't include the ANSI C library, the abort()
- // function is defined below.
- //
- // Do NOT include this file in your project if you use the ANSI C library.
- // If you use the ANSI C Library, include the file console.stubs.c (in the
- // folder with the SIOUX libraries) in your project instead of UException.cp.
-
- #include <UDebugging.h>
-
-
- #ifndef __SEGLOAD__
- #include <SegLoad.h>
- #endif
-
-
- // ---------------------------------------------------------------------------
- // • abort
- // ---------------------------------------------------------------------------
- // Terminate a program
-
- extern "C" void abort(void);
- void abort(void)
- {
- SignalPStr_("\pAborting Program. Probably a throw without a matching catch.");
- ::ExitToShell();
- }
-